perm filename QUINE[S76,JMC] blob sn#212860 filedate 1976-04-26 generic text, type C, neo UTF8
COMMENT āŠ—   VALID 00002 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00002 00002	.require "memo.pub[let,jmc]" source
C00004 ENDMK
CāŠ—;
.require "memo.pub[let,jmc]" source;
	A LISP predicate  %2term%1 is called a termination  tester if
for any  S-expression %2e%1, %2term[e]%1 = T if  and only if the LISP
evaluation of  %2e%1  terminates; otherwise  %2term[e]%1  = F  or  is
undefined.   Thus we must have  %2term[%1(CAR (QUOTE (A)))] =  T, and
%2term[%1((LABEL FOO (LAMBDA (X) (FOO X))) NIL)] may have the value F
or  may   be  undefined.      Let  %2term*%1   be  the   S-expression
representation of %2term%1.

	Write a LISP function %2bad%1 such that for any termination
tester %2term%1, %2bad[term*]%1 is defined, but %2term[bad[term*]]%1
is undefined.  Show that your %2bad%1 works.

Hint: A two line answer is possible using %2subst%1 and the function
%2quine[x] = subst[x,%1X,(X (QUOTE X))].